package david.java.flink_sql.udf.offline;

import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.hive.ql.exec.UDF;

/**
 * @Description:
 * @Author: ZhaoDawei
 * @Date: Create in 6:04 下午 2022/6/28
 */
public class IsBlank extends UDF {
    public boolean evaluate(String str) {
        return StringUtils.isBlank(str);
    }

    public static void main(String[] args) {
        IsBlank isBlank = new IsBlank();
        System.out.println(isBlank.evaluate("   "));
        System.out.println(isBlank.evaluate(null));
        System.out.println(isBlank.evaluate("null"));
        System.out.println(isBlank.evaluate(""));
    }
}
